<h1 class="ui header">方差约束</h1>
<div class="ui grid">
    <div class="thirteen wide column">
        <div class="ui one column centered grid" >
            <h4 class="ui column center aligned">数据展示</h4>
            <div class="column" ng-show="!showChart">
                <dat-table data="inputDataTable"></dat-table>
            </div>
            <div class="column"   ng-show="showChart">
                <fan-data-problem-chart class="ui one column centered grid" style="width:100%; height:400px;"></fan-data-problem-chart>
            </div>
        </div>
    </div>

    <div class="three wide column">
        <div class="ui one column centered grid">
            <h4 class="ui column center aligned">配置项</h4>
            <div class="ui form">
                <div class="field" ng-show="detectionProcess">
                    <label>输入文件路径</label>
                    <input type="text" ng-model="inputPath" placeholder="/path/file.csv">
                    <a type="file" ngf-select="uploadFiles($file, $invalidFiles)" ngf-max-size="30MB"
                       class="fluid mini ui bottom attached button center aligned">上传数据</a>
                </div>

                <div class="field" ng-show="detectionProcess">
                    <label>输出检测结果路径</label>
                    <input type="text" ng-model="outputDetectionPath" placeholder="/path/file.csv">
                </div>

                <div class="field" ng-show="detectionProcess">
                    <label>选择列名称</label>
                    <select ng-model="usedAttr" select-search>
                        <option ng-repeat="attr in autoCompleteAttrs" ng-if="attr != '_ts'" value="{{attr}}">{{attr}}</option>
                    </select>
                </div>

                <div class="field" ng-show="detectionProcess">
                    <label>检测窗口长度</label>
                    <input type="text" ng-model="detectionWindowSize" placeholder="10" >
                </div>

                <div class="field" ng-show="detectionProcess">
                    <label>不精确数据的窗口阈值</label>
                    <input type="text" ng-model="detectionWindowConfidence" placeholder="5" title="若超过阈值个包含此数据的窗口方差超过约束，那么此数据是不精确的">
                </div>

                <div class="field" ng-show="detectionProcess">
                    <label>约束值</label>
                    <input type="text" ng-model="detectionConstraint" placeholder="0.1">
                    <label  title="将约束值作为相邻数据之差，来计算方差约束"><input type="checkbox" ng-model="isDifference"  style="vertical-align:middle;">相邻数据之差约束</label>
                </div>

                <div class="field" ng-show="detectionProcess" >
                    <button class="fluid ui button primary" ng-click="detection()">检测</button>
                    <button id="goToRepair" class="fluid ui button primary" ng-click="goToRepair()" disabled="disabled" style="margin-top: 5px;">进行修复</button>
                </div>

                <div class="field" ng-show="!detectionProcess">
                    <button class="fluid ui button primary" ng-click="backToDetection()" >回到检测</button>
                </div>

                <div class="field" ng-show="!detectionProcess">
                    <label>输出修复结果路径</label>
                    <input type="text" ng-model="outputRepairPath" placeholder="/path/file.csv">
                </div>

                <div class="field" ng-show="!detectionProcess">
                    <label>选择修复算法</label>
                    <select ng-model="repairAlgorithm" select-search>
                        <option ng-repeat="algorithm in repairAlgorithmList" value="{{algorithm.url}}">{{algorithm.name}}</option>
                    </select>
                </div>

                <div class="field" ng-show="!detectionProcess">
                    <label id="repairAlgorithmAttrLabel"></label>
                    <input type="text" ng-model="repairAlgorithmAttr" placeholder="10" ng-show="showRepairAlgorithmAttr">
                </div>

                <button class="fluid ui button primary" ng-click="repair()" ng-show="!detectionProcess">修复</button>


            </div>
        </div>
    </div>
</div>
